<?php

namespace app\process;

use app\services\RedisQueue;
use plugin\admin\app\model\RequestLog;
use support\Redis;
use Workerman\Crontab\Crontab;

class Task
{
    public function onWorkerStart()
    {
//        // 每1分钟执行一次
//        new Crontab('0 */1 * * * *', function(){
//            $list = RequestLog::where('status', 0)->pluck('body')->toArray();
//            if (!empty($list)){
//                foreach ($list as $v){
//                    RedisQueue::orderNotify(json_decode($v, true));
//                }
//            }
//        });
    }
}